import request from '@/utils/requests.ts'

// 注册
export async function registerApi(data: any) {
  return request({
    url: '/user/register',
    method: 'post',
    data,
  })
}

// 登录
export async function loginApi(data: any) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
  })
}

// 获取用户信息
export async function getUserInfoApi() {
  return request({
    url: '/user/info',
    method: 'get',
  })
}

// 注销登录
export async function logoutApi() {
  return request({
    url: '/user/logout',
    method: 'get',
  })
}

// 获取用户列表
export async function getUserListApi(data: any) {
  return request({
    url: '/user/list',
    method: 'post',
    data,
  })
}


// 删除用户
export async function deleteUserApi(data: any) {
  return request({
    url: '/user/remoev',
    method: 'post',
    data
  })
}
